package cn.wolfcode.tieba.controller;

import cn.wolfcode.tieba.domain.Tiezi;
import cn.wolfcode.tieba.service.ITieziService;
import cn.wolfcode.tieba.util.JsonResult;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 王金龙
 * @date 2021/2/6 11:38
 */
@RestController
@RequestMapping("f")
public class TieZiController {
    @Autowired
    private ITieziService tieziService;

    @GetMapping
    public Object list() {
        return JsonResult.success(tieziService.listAll());
    }

    @GetMapping("/infoNum")
    public Object infoNum() {
        return JsonResult.success(tieziService.count());
    }


}
